<template>
	<view class="u-demo">
		<view class="u-demo-title">
			{{content.name}}
		</view>
		<image :src="base+content.imgUrl" @click="dianji" style="width: 100%;" mode=""></image>
		<uni-card title="图书馆信息">
			<view class="">
				图书馆具体地址：{{content.address}}
			</view>
			<view class="">
				图书馆介绍：{{content.description}}
			</view>
			<view class="">
				营业时间：{{content.businessHours}}
			</view>
			<view class="">
				营业状态：{{content.businessState == 1?'营业中':'打烊'}}
			</view>
		</uni-card>
		<uni-group style="position: fixed;right: 0%;bottom: 0%;left: 0%;">
			<button @click="ping" type="primary">去评论</button>
		</uni-group>
	</view>
</template>

<script>
	import api from 'commer/apiURL.js'
	export default {
		data() {
			return {
				base:api.baseurl,
				content:''
			}
		},
		onLoad(options) {
			this.getlun(options.id)
		},
		methods: {
			ping(){
				uni.navigateTo({
					url:'pinglun?id='+this.content.id
				})
			},
			getlun(id){
				this.$get(this.base+'/prod-api/api/digital-library/library/'+id).then((res)=>{
					this.content = res.data
				})
			}
		}
	}
</script>

<style>

</style>
